import java.awt.image.BufferedImage;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.imageio.ImageIO;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import org.hsqldb.Statement;

import com.qq.spirit.HttpUtil;
import com.qq.spirit.image.OCR;

public class Test3
{

	public static void main(String[] args)
	{
		try
		{
			 Class.forName("org.hsqldb.jdbcDriver");   
			 Connection c = DriverManager.getConnection("jdbc:hsqldb:file:/E:/hsqldb/data/dbname;shutdown=true", "sa", "");
			 java.sql.Statement sta = c.createStatement();
			 sta.execute("create database  u_test");
			 sta.execute("SET SCRIPTFORMAT  BINARY");
			 sta.execute("create table test(name varchar(32),value varchar(32))");
			
			 sta.executeUpdate("insert into test values('3','2')");
			 sta.executeUpdate("insert into test values('3','2')");
			 sta.executeUpdate("insert into test values('3','2')");
			 sta.executeUpdate("insert into test values('3','2')");
			 sta.executeUpdate("insert into test values('3','2')");
			 ResultSet rs = sta.executeQuery("select * from test");
			 while(rs.next())
			 {
				 System.out.println(rs.getString(1));
			 }
			 
			 c.close();
		} catch (Exception e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	
}
